package base.thread.saleTicket;

public class MainTest {

	public static void main(String[] args) {
		Ticket ticket = new Ticket();

		/**
		 * 产生一个顾客对象，用来获取顾客
		 */
		Consumer consumer = new Consumer(ticket);
		Thread threadConsumer = new Thread(consumer);
		threadConsumer.start();

		/**
		 * 产生四个窗口
		 */
		Windows windows = new Windows(ticket);
		for (int i = 1; i < 5; i++) {
			Thread threadWindows = new Thread(windows);
			threadWindows.setName(i + "号窗口");
			threadWindows.start();
		}
	}
}
